package com.mzj.saas.mservice.sys.repository;

import com.mzj.saas.mservice.sys.entity.DepartmentRoleRecord;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface DepartmentRoleRecordRepository  extends PagingAndSortingRepository<DepartmentRoleRecord, Long>, JpaSpecificationExecutor<DepartmentRoleRecord> {
     @Transactional
    void deleteByDeptIdAndPermissionId(Long depId,Long permissionId);
     DepartmentRoleRecord findByDeptIdAndPermissionId(Long depId,Long permissionId);
     List<DepartmentRoleRecord> findByDeptId(Long depId);
}
